package com.kingdee.eas.hr.contract.app;

import javax.ejb.*;
import java.rmi.RemoteException;
import com.kingdee.bos.*;
import com.kingdee.bos.util.BOSObjectType;
import com.kingdee.bos.metadata.IMetaDataPK;
import com.kingdee.bos.metadata.rule.RuleExecutor;
import com.kingdee.bos.metadata.MetaDataPK;
//import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.framework.ejb.AbstractEntityControllerBean;
import com.kingdee.bos.framework.ejb.AbstractBizControllerBean;
//import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.bos.dao.IObjectCollection;
import com.kingdee.bos.service.ServiceContext;
import com.kingdee.bos.service.IServiceContext;
import com.kingdee.eas.framework.Result;
import com.kingdee.eas.framework.LineResult;
import com.kingdee.eas.framework.exception.EASMultiException;
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;

import java.lang.String;
import com.kingdee.bos.util.BOSUuid;
import com.kingdee.eas.common.EASBizException;



public abstract class AbstractRenewContractAuditStateFacadeControllerBean extends AbstractBizControllerBean implements RenewContractAuditStateFacadeController
{
    protected AbstractRenewContractAuditStateFacadeControllerBean()
    {
    }

    protected BOSObjectType getBOSType()
    {
        return new BOSObjectType("91A409C5");
    }

    public void changeOnState(Context ctx, BOSUuid billId, String value, String auditResult) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("bf99c54f-f2f4-4e96-8365-eca5b29c5b26"), new Object[]{ctx, billId, value, auditResult});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            _changeOnState(ctx, billId, value, auditResult);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected void _changeOnState(Context ctx, BOSUuid billId, String value, String auditResult) throws BOSException, EASBizException
    {    	
        return;
    }

    public void sendEmailOrMessage(Context ctx, BOSUuid billId, String messageNum, String emailNum) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("66398c40-553d-4208-a531-e1f9793e557c"), new Object[]{ctx, billId, messageNum, emailNum});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            _sendEmailOrMessage(ctx, billId, messageNum, emailNum);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected void _sendEmailOrMessage(Context ctx, BOSUuid billId, String messageNum, String emailNum) throws BOSException, EASBizException
    {    	
        return;
    }

    public String judgeProcessRun(Context ctx, BOSUuid billId) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("d0f3db9f-99cd-4605-b4d6-0f4fd2249172"), new Object[]{ctx, billId});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            String retValue = (String)_judgeProcessRun(ctx, billId);
            svcCtx.setMethodReturnValue(retValue);
            }
            invokeServiceAfter(svcCtx);
            return (String)svcCtx.getMethodReturnValue();
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected String _judgeProcessRun(Context ctx, BOSUuid billId) throws BOSException, EASBizException
    {    	
        return null;
    }

    public void getAuditName(Context ctx, BOSUuid billId) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("a8679feb-7885-4c2c-b5df-99104d0b28a9"), new Object[]{ctx, billId});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            _getAuditName(ctx, billId);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected void _getAuditName(Context ctx, BOSUuid billId) throws BOSException, EASBizException
    {    	
        return;
    }

    public String getAdminOrgName(Context ctx, String longName) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("386beb6a-a011-4f02-9a6a-03c808500f93"), new Object[]{ctx, longName});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            String retValue = (String)_getAdminOrgName(ctx, longName);
            svcCtx.setMethodReturnValue(retValue);
            }
            invokeServiceAfter(svcCtx);
            return (String)svcCtx.getMethodReturnValue();
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected String _getAdminOrgName(Context ctx, String longName) throws BOSException, EASBizException
    {    	
        return null;
    }

}